package com.aaa.eat.controller;

import com.aaa.eat.pojo.vo.MealVo;
import com.aaa.eat.result.AjaxResult;
import com.aaa.eat.service.EmpService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * Author:张海金
 * Description:T0D0
 * DateTime:2022/1/20 18:05
 **/
@RestController
@RequestMapping("admin")
public class EmpController {

    @Autowired
    private EmpService empService;

    @RequestMapping("login")
    public AjaxResult login(String username,String password){
        return empService.login(username, password);
    }
    @RequestMapping("getInfo")
    public AjaxResult getInfo(){
        return empService.getInfo();
    }
    @RequestMapping("denglu")
    public AjaxResult denglu(@Param("zhanghao") String zhanghao, @Param("mima") String mima){
        return empService.denglu(zhanghao,mima);
    }

    @RequestMapping("getName")
    public AjaxResult getName(Integer id){

        return empService.getName(id);
    }

}
